<template>
  <div class="layout1-container">
    <div class="header">
      <div class="left">
        <img :src="require('@/assets/images/logo-color.png')" alt="" class="login-logo" style="height:65px">
        <img :src="require('@/assets/images/login_logo.png')" alt="" class="login-logo" style="height:25px">
      </div>
      <div class="right">
        <span><a href="https://gitee.com/chiship-cn/chiship-framework-simple" target="_blank">码云</a></span>
        <span>官网首页 </span>
      </div>
      <div class="login-version">
        <p class="login-version-text">版本:{{ $config.siteVersion }}</p>
      </div>
    </div>
    <div class="main">
      <div class="main-container">
        <router-view />
      </div>
    </div>
    <div class="footer">
      <div class="left">
        <span>技术支持：{{ $config.technicalSupport }} </span>|
        <span>联系电话：{{ $config.companyTel }}</span>|
        <span v-html="$config.CopyrightInfo" />
        <span v-html="$config.filingInfo" />
      </div>
      <div class="right">
        <span v-if="screenWidth">{{ screenWidth }}px * {{ screenHeight }}px</span>
        <span class="common-cursor" @click="goView('serviceAgreement')">服务协议</span> |
        <span class="common-cursor" @click="goView('privacyAgreement')">隐私协议</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Layout1',
  data() {
    return {
      screenWidth: window.innerWidth,
      screenHeight: window.innerHeight
    }
  },
  watch: {

  },
  created() {
  },
  destroyed() {
  },
  methods: {
    goView(code) {
      window.open(this.$router.resolve({ path: '/legaAgreement/' + code }).href)
    }
  }
}
</script>
<style lang="scss" scoped>

.layout1-container {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  height: 100%;
  width: 100%;
  min-width: 1200px;
  background: url(~@/assets/images/login_bg.png) no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  .header{
    height: 65px;
    display: flex;
    flex-direction: row;
    line-height: 65px;
    color: #fff;
    .left{
      flex: 1;
      align-items: center;
      display: flex;
      .login-logo{
        margin-left: 20px;
      }
    }
    .right{
      text-align: right;
      margin-right: 60px;
      span{
        cursor: pointer;
        margin: 0 8px;
      }
    }
    .login-version{
      position: fixed;
      right: 0;
      top: 0;
      width: 79px;
      height: 79px;
      background: url(~@/assets/images/login_version.png) no-repeat 50%;
      background-size: 100%;
      .login-version-text {
        width: 60px;
        height: 60px;
        line-height: 6px;
        text-align: center;
        color: #fff;
        font-size: 12px;
        -webkit-transform: rotate(45deg);
        transform: rotate(45deg);
      }
    }
  }
  .main{
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .main-container{
      display: flex;
      flex-direction: row;
      width: 1200px;
      margin: 0 auto;
    }

  }
  .footer{
    height: 42px;
    line-height: 42px;
    display: flex;
    flex-direction: row;
    padding-left: 8px;
    padding-right: 8px;
    color: #fff;
    .left{
      flex: 1;
    }
    .right{
      text-align: right;
      span{
        cursor: pointer;
      }
    }
    span{
      margin-left: 5px;
      margin-right: 5px;
    }
  }

}
</style>
